package com.hzy.yiyaoba.utils;

import android.content.Context;

import com.lidroid.xutils.BitmapUtils;

public class BitmapManager {

	private static BitmapManager instance = null;
	private BitmapUtils utils = null;
	private Context mContext = null;

	private BitmapManager() {
	};

	public static BitmapManager getInstance(Context context) {
		synchronized (BitmapManager.class) {
			if (instance == null) {
				instance = new BitmapManager();
				instance.mContext = context;
			}
		}
		return instance;
	}

	public BitmapUtils getBitmapUtils() {
		synchronized (BitmapUtils.class) {
			if (utils == null) {
				String tempDir = CommonUtils.getTempPath();
				utils = new BitmapUtils(mContext, tempDir);
			}
		}
		return utils;
	}

}
